import { request } from '~/util'
export interface ShareInfo {
  userId: number
  typeId?: 0 | 1 // 0: 自己 1: 他人
  fileList: number[]
  folderList: number[]
  shareName: string
}
// 获取用户的分享记录
export const getShareList = (shareInfo: ShareInfo) => {
  return request.get<any[]>(`/shares/`, {
    params: shareInfo
  })
}

// // 获取分享记录详情
// export const getSharedDetails = (shareInfo: ShareInfo) => {
//   return request.get<any[]>(`/shares/getSharedDetails`, {
//     params: shareInfo
//   })
// }
// 创建分享记录
export const createShare = (shareInfo: ShareInfo) => {
  console.log('🚀 ~ createShare ~ shareInfo:', shareInfo)
  return request.post<any[]>('/shares/', shareInfo)
}
